<div class="form-group">
    <label>{{$type->display_name}}标题：</label>
    <input class="form-control" name="title" placeholder="{{$type->display_name}}标题" value="{{$archive->title or ''}}" style="font-size: 20px">
</div>
@if(session('user')->content_manage)
    <div class="form-group">
        <label>{{$type->display_name}}副标题：</label>
        <input class="form-control" name="subtitle" placeholder="{{$type->display_name}}副标题" value="{{$archive->subtitle or ''}}" style="font-size: 20px">
    </div>
@endif
<style>.tag-input a {float: left;}</style>
<div class="form-group tag-input">
    <label>标签(数量不可超过三个，选择好标签有助提升阅读量)</label>
    <p style="border-bottom:2px solid #ccc;padding:15px 0 7px 0;">
        <span id="extract">
        @if (isset($tags))
            @foreach($tags as $tag)
                <a href="javascript:void(0)" class="btn btn-primary btn-xss">  {{ $tag->name }}<i class="fa fa-times"></i></a>
            @endforeach
        @endif
        </span>
        <input id="add-tag" class="form-control" placeholder="输入标签,回车确认" style="width:auto; border:none;padding-top:0;padding-bottom:0;min-height:30px;height:30px;" >
    </p>
</div>
@if(session('user')->master)
    <!-- 管理员属性编辑开始 -->
    <div class="row">
        <!-- 单属性控制 -->
        @foreach($patterns as $p)
            <div class="form-group col-md-3">
                <div class="list-group-item withswitch">
                    <h5 class="list-group-item-heading">{{$p->display_name}}</h5>
                    <p class="list-group-item-text">{{'{'.$p->name.'}'}}</p>
                    <div class="switch">
                        <input id="cmn-toggle-{{$p->name}}" class="cmn-toggle
                                                                cmn-toggle-round" type="checkbox" name="{{$p->name}}"
                               @if(isset($archive) && ($archive->mode & $p->pattern) == $p->pattern)
                               checked="checked"
                                @endif
                        >
                        <label for="cmn-toggle-{{$p->name}}" style="border:none;"></label>
                    </div>
                </div>
            </div>
        @endforeach
        @if(session('user')->master)
            <div class="form-group col-md-3">
                <div class="list-group-item withswitch">
                    <h5 class="list-group-item-heading">奇异果资讯</h5>
                    <p class="list-group-item-text">news</p>
                    <div class="switch">
                        <input id="cmn-toggle-news" class="cmn-toggle
                                                            cmn-toggle-round" type="checkbox" name="news"
                               @if(isset($archive) && $archive->news)
                               checked="checked"
                                @endif
                        >
                        <label for="cmn-toggle-news" style="border:none;"></label>
                    </div>
                </div>
            </div>
    @endif
    <!-- 单属性控制 -->
        <div class="form-group col-md-12">
            <label>栏目</label>
            <select class="form-control" name="category_id">
                <option value="0">选择系统栏目</option>
                @foreach($cate as $c)
                    <option @if(isset($archive) && $archive->category_id == $c->cate_id)
                            selected
                            @endif
                            value="{{$c->cate_id}}">
                        {{str_repeat('--', $c->lev)}} {{$c->cate_name}}
                    </option>
                @endforeach
            </select>
        </div>
    </div>
    <!-- 管理员属性编辑开始 -->
@endif